package com.jackyzgy.test.thread;

public class Thread4 extends Thread {

	public static boolean flag4 = true;

	@Override
	public void run() {
		while (flag4) {
			boolean isThread1Alive = MainTest.thread1.isAlive();
			boolean isThread2Alive = MainTest.thread2.isAlive();
			boolean isThread3Alive = MainTest.thread3.isAlive();

			System.out.println("thread1 >> " + isThread1Alive);
			System.out.println("thread2 >> " + isThread2Alive);
			System.out.println("thread3 >> " + isThread3Alive);
			
			try {
				sleep(1000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}

}
